from PIL import Image
from utils.commonUtils import get_all_file_in_dir


def resize_img(path, size):
    '''
    修改图片大小
    :param path:
    :param size:
    :return:
    '''
    img_list = get_all_file_in_dir(path)
    for img in img_list:
        im = Image.open(img)
        im = im.resize(size)
        im.save(img)